
////////////////////////////////////////////////////////////////////////////////
//
// Main.java
//
// Copyright © (C) 2010
// 
// Emory Hughes Merryman, III
// emory.merryman@gmail.com
// 
// All Rights Reserved
// 
// This file is part of Interworks.
// 
// Interworks is free software: you can 
// redistribute it and/or modify it under 
// the terms of the GNU General Public 
// License as published by the Free 
// Software Foundation, either version 3 
// of the License, or (at your option) any 
// later version.
// 
// This program is distributed in the hope 
// that it will be useful, but WITHOUT 
// ANY WARRANTY; without even the 
// implied warranty of MERCHANTABILITY 
// or FITNESS FOR A PARTICULAR 
// PURPOSE.  See the GNU General Public 
// License for more details.
//
// You should have received a copy of the 
// GNU General Public License along with 
// this program.  If not, see 
// <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////

package
    com . superiorglobalbusiness . cB7zEmeT ;

import org . docx4j . openpackaging . packages . WordprocessingMLPackage ;

final class Main
{
    private Main ( )
    {
	super ( ) ;
    }

    public static final void main ( final java . lang . String [ ] args ) throws Exception
    {
	if ( args . length != 2 )
	    {
		java . lang . System . exit ( 0 ) ;
	    }
	/*
	final org . jdom . Document inputDocument = XMLReader . getXMLFile ( args [ 0 ] ) ;
	*/
	final WordprocessingMLPackage w = WordprocessingMLPackage . createPackage ( ) ;

	w . getMainDocumentPart ( ) . addStyledParagraphOfText ( "Title" , "Hello World" ) ;
	w . getMainDocumentPart ( ) . addParagraphOfText ( "from docx4j" ) ;
	

	final org . docx4j . wml . ObjectFactory f = new org . docx4j . wml . ObjectFactory ( ) ;
	final org . docx4j . wml . P p = f . createP ( ) ;
	final org . docx4j . wml . R r = f . createR ( ) ;
	final org . docx4j . wml . Highlight h = f . createHighlight ( ) ;
	h . setVal ( "COOL!!!!!!!!!!!!!!!" ) ;
	h . setParent ( r ) ;
	r . setParent ( p ) ;
	w . getMainDocumentPart ( ) . addObject ( p ) ;
	

	final java . io . File outputFile = new java . io . File ( args [ 1 ] ) ;
	w . save ( outputFile ) ;
	
    }
}